home *** CD-ROM | disk | FTP | other *** search
/ CGI How-To / CGI HOW-TO.iso / chap6 / 6_5 / dirsub_c / dirsub.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-15  |  529 b   |  27 lines

  1.  
  2. #include "parsehtm.h"
  3. #include "handler.h"
  4. #include <stdio.h>
  5.  
  6. void main(int argc, char *argv[])
  7. {
  8.     String output;
  9.     
  10.     initializeHtmlParsingLibrary();
  11.     
  12.     dict_setValueForKey(handlerDict,"DIRECTIVE",directiveHandler);
  13.     dict_setValueForKey(handlerDict,"directive.toolbar",toolbarHandler);
  14.     
  15.     output = parseHtml("dirsub_c.htm");
  16.     
  17.     if(output && output->string)
  18.     {
  19.         printf("Content-type: text/html\n\n");
  20.         fwrite(output->string,sizeof(char),strlen(output->string),stdout);
  21.         printf("\n");
  22.         
  23.         string_free(output);
  24.     }
  25.     
  26.     exit(0);
  27. }